<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="utf-8">
    <title>${metadata.alias!}</title>
</head>
<body>
    <header>
        <h1>${(site.name)!}</h1>
    </header>
    <nav>
        <a href="${site.useStatic?then(site.sitePath,base)}">ホームページ</a>
<@_categoryList>
    <#list page.list as a>
        <a href="${a.url!}" target="_blank">${a.name}</a>
    </#list>
</@_categoryList>
    </nav>
    <main>
        <h2>最新のコンテンツ</h2>
<@_contentList onlyUrl=false pageSize=10>
    <#list page.list as a>
        <article>
            <h3><a href="${a.url!}" target="_blank">${a.title}</a></h3>
            <p>
                <#if a.cover?has_content><img src="${a.cover}" alt="${a.title}"/></#if>
                ${a.description!}
            </p>
        </article>
    </#list>
</@_contentList>
        <aside>
            <h3>人気のコンテンツ</h3>
            <ul>
<@_contentList orderField='clicks' pageSize=10>
    <#list page.list as a>
                <li><a href="<#if a.onlyUrl>${site.dynamicPath}content/redirect?id=${a.id}<#else>${a.url!}</#if>" target="_blank">${a.title}</a><span>${a.clicks}</span></li>
    </#list>
</@_contentList>
            </ul>
        </aside>
    </main>
    <footer>
        <#if base?has_content>
            <a href="?locale=zh_CN">中文</a>
            <a href="?locale=en">English</a>
        </#if>
        Copyright &copy; ${.now?string('yyyy')}
    </footer>
    <script src="${site.dynamicPath}resource/js/cms.analytics.js"></script>
    <script>
        var ca = cmsAnalytics();
        var url='${site.dynamicPath}api/visit/record';
        if("string" ==typeof itemString){
            url=url+"?"+itemString;
        }
        ca.setDomain("${(domain.name)!site.sitePath?keep_after('//')?keep_before('/')?keep_before(':')}");
        ca.setPath('/');
        ca.report(url);
    </script>
</body>
</html>